package com.zheng.study.company.dao;

import com.zheng.study.base.dao.BaseDao;
import com.zheng.study.company.entity.Company;
import com.zheng.study.company.entity.Department;
import com.zheng.study.company.entity.Power;

import java.util.List;

/**
 * newFile
 * ============================================================================
 * author : dzw
 * createDate:  2018/8/24 。
 * ============================================================================
 */
public interface PowerDao extends BaseDao<Power, String> {

	/**
	 * 获取职权同级及上级部门职权列表
	 */
	List<Power> getLevelPowers(Company company, Department department);

	/**
	 * 获取最顶级职权列表
	 */
	List<Power> getRootPowerList(Company company);

	/**
	 * 判断一个职权是否拥有子职权
	 */
	boolean checkIsHasChildren(Power power);

}
